Skip to content

Conversation

@intellix
Copy link

Two new ENV vars:

  • POSTGRES_AUTHORITY=slave
  • POSTGRES_MASTER_HOST=1.2.3.4

If you pass in "slave" authority, the server will fetch the LATEST backup from AWS and recover the node to it's current state.

There were two headaches here for me:

  • You can't delete $PGDATA as it's in use, so you have to download to /tmp and copy it in
  • You have to stop the server before copying in the files or else when the server comes back up again, it'll try and download incorrect WAL files and you'll end up with an empty DB (spent about 5hrs debugging this!). You have to bring the server back up again or else the original init script complains that postmaster.pid doesn't exist when it tries to stop it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant